package com.guguju.ssms.feature.Html;

import android.os.Bundle;
import android.os.Vibrator;
import android.text.TextUtils;
import android.widget.ProgressBar;

import com.blankj.utilcode.utils.SPUtils;
import com.guguju.ssms.R;
import com.guguju.ssms.constant.IntentParms;
import com.guguju.ssms.core.base.BaseActivity;
import com.guguju.ssms.feature.HealthMonitor.HealthMonitorFragment;

/**
 * Created by dell on 2022-5-22.
 */
public class HtmlActivity extends BaseActivity {

    private static String TAG = HtmlActivity.class.getSimpleName();
    private static final String JS_OBJECT_NAME = "GugujuApp";


    /**
     * 传入的URL
     */
    private String baseUrl;
    private String htmlFrom;

    ProgressBar mProgress;

    private SPUtils schemeSp;
    private static final int ANDROID = 2;
    private boolean isNewTitleBar;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        setContentView(R.layout.activity_html);
        mProgress=(ProgressBar)findViewById(R.id.pb_html5);
        super.onCreate(savedInstanceState);

        if (getIntent() != null) {
            baseUrl = getIntent().getStringExtra(IntentParms.HTML5_URL);
            htmlFrom = getIntent().getStringExtra(IntentParms.HTML5_URL_FROM);
        }

        if (!TextUtils.isEmpty(baseUrl)) {
            HealthMonitorFragment fragment = HealthMonitorFragment.newInstance(baseUrl.trim(), 1, htmlFrom);
            getSupportFragmentManager().beginTransaction().add(R.id.fragment, fragment).commit();
        }

    }

    @Override
    protected void onResume() {
        super.onResume();
    }

}
